/**
 * 
 */
package cp1300.ass1.trafficlight;

/**
 * @author MorbidSaint
 *
 */
public class Car {

    /**
     * X-Axis Position of car
     */
    int xPos;

    /**
     * Y-axis position of car
     */
    int yPos;

    /**
     * Direction of Car
     * @see <a>GridConstants.LEFT_RIGHT</a>
     */
    int iDirection;
    
    /**
     * Iteration of the simulation for a single car
     */
    int iIterationRun;
    
    
    /**
     * Variable to see if the car finished its route
     */
    boolean bRunOver;
    
    /**
     * Default Constructor
     *  
     */
    
    public Car(){
        xPos = 0;
        yPos = 0;
    }
    
    /**
     * @param xPos X-axis Position
     * @param yPos Y-axis Position
     * @param iDirection Direction(Left to Right or Top to Bottom)
     * @param bRunOver If the car finished its route
     */
    public Car(int xPos,int yPos,int iDirection,boolean bRunOver){
        this.xPos = xPos;
        this.yPos = yPos;
        this.iDirection = iDirection;
        this.bRunOver = bRunOver;
    }

    /**
     * 
     * @return X-axis Position of the car
     */
    public int getXPos() {
        return xPos;
    }

    /**
     * 
     * @param xPos X-axis Position of the car
     */
    public void setXPos(int xPos) {
        this.xPos = xPos;
    }

    /**
     * 
     * @return Y-axis Position of the car
     */
    public int getYPos() {
        return yPos;
    }

    /**
     * 
     * @param yPos Y-axis Position of the car
     */
    public void setYPos(int yPos) {
        this.yPos = yPos;
    }
    
    /**
     * 
     * @param iDirection Direction of the car
     */
    public void setDirection(int iDirection){
        this.iDirection = iDirection;        
    }
    
    /**
     * 
     * @return iDirection Direction of the car
     */
    public int getDirection(){
        return iDirection;
    }
    
    /**
     * 
     * @return Iteration of the car in a simulation run
     */
    public int getIterationRun(){
        return iIterationRun;
    }
    
    /**
     * 
     * @param iIterationRun sets the iteration of the car in a simulation run
     */
    public void setIterationRun(int iIterationRun){
        this.iIterationRun = iIterationRun;
    }
    
    /**
     * 
     * @param bRunOver If the car has finished its route
     */
    public void setRunOver(boolean bRunOver){
        this.bRunOver = bRunOver;
    }
    /**
     * 
     * @return true if the car has finished its route
     */
    public boolean isRunOver(){
        return bRunOver;
    }
}

